// **********************************************************************
//
// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************

// Ice version 3.3.1
// Generated from file `CamMotion.ice'

#include <CamMotion.h>
#include <Ice/LocalException.h>
#include <Ice/ObjectFactory.h>
#include <Ice/BasicStream.h>
#include <IceUtil/Iterator.h>
#include <IceUtil/ScopedArray.h>

#ifndef ICE_IGNORE_VERSION
#   if ICE_INT_VERSION / 100 != 303
#       error Ice version mismatch!
#   endif
#   if ICE_INT_VERSION % 100 > 50
#       error Beta header file detected
#   endif
#   if ICE_INT_VERSION % 100 < 1
#       error Ice patch level mismatch!
#   endif
#endif

static const ::std::string __RoboCompCamMotion__CamMotion__resetHead_name = "resetHead";

static const ::std::string __RoboCompCamMotion__CamMotion__stopHead_name = "stopHead";

static const ::std::string __RoboCompCamMotion__CamMotion__setPanLeft_name = "setPanLeft";

static const ::std::string __RoboCompCamMotion__CamMotion__setPanRight_name = "setPanRight";

static const ::std::string __RoboCompCamMotion__CamMotion__setTiltLeft_name = "setTiltLeft";

static const ::std::string __RoboCompCamMotion__CamMotion__setTiltRight_name = "setTiltRight";

static const ::std::string __RoboCompCamMotion__CamMotion__setTiltBoth_name = "setTiltBoth";

static const ::std::string __RoboCompCamMotion__CamMotion__setNeck_name = "setNeck";

static const ::std::string __RoboCompCamMotion__CamMotion__saccadic2D_name = "saccadic2D";

static const ::std::string __RoboCompCamMotion__CamMotion__saccadic3D_name = "saccadic3D";

static const ::std::string __RoboCompCamMotion__CamMotion__getMotorRanges_name = "getMotorRanges";

static const ::std::string __RoboCompCamMotion__CamMotion__getMotorState_name = "getMotorState";

static const ::std::string __RoboCompCamMotion__CamMotion__getHeadState_name = "getHeadState";

static const ::std::string __RoboCompCamMotion__CamMotion__getHeadRanges_name = "getHeadRanges";

static const ::std::string __RoboCompCamMotion__CamMotion__setRadSaccadic_name = "setRadSaccadic";

static const ::std::string __RoboCompCamMotion__CamMotion__isMovingMotor_name = "isMovingMotor";

static const ::std::string __RoboCompCamMotion__CamMotion__isMovingHead_name = "isMovingHead";

::Ice::Object* IceInternal::upCast(::RoboCompCamMotion::CamMotion* p) { return p; }
::IceProxy::Ice::Object* IceInternal::upCast(::IceProxy::RoboCompCamMotion::CamMotion* p) { return p; }

void
RoboCompCamMotion::__read(::IceInternal::BasicStream* __is, ::RoboCompCamMotion::CamMotionPrx& v)
{
    ::Ice::ObjectPrx proxy;
    __is->read(proxy);
    if(!proxy)
    {
        v = 0;
    }
    else
    {
        v = new ::IceProxy::RoboCompCamMotion::CamMotion;
        v->__copyFrom(proxy);
    }
}

RoboCompCamMotion::HardwareFailedException::HardwareFailedException(const ::std::string& __ice_what) :
#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug
    UserException(),
#else
    ::Ice::UserException(),
#endif
    what(__ice_what)
{
}

RoboCompCamMotion::HardwareFailedException::~HardwareFailedException() throw()
{
}

static const char* __RoboCompCamMotion__HardwareFailedException_name = "RoboCompCamMotion::HardwareFailedException";

::std::string
RoboCompCamMotion::HardwareFailedException::ice_name() const
{
    return __RoboCompCamMotion__HardwareFailedException_name;
}

::Ice::Exception*
RoboCompCamMotion::HardwareFailedException::ice_clone() const
{
    return new HardwareFailedException(*this);
}

void
RoboCompCamMotion::HardwareFailedException::ice_throw() const
{
    throw *this;
}

void
RoboCompCamMotion::HardwareFailedException::__write(::IceInternal::BasicStream* __os) const
{
    __os->write(::std::string("::RoboCompCamMotion::HardwareFailedException"), false);
    __os->startWriteSlice();
    __os->write(what);
    __os->endWriteSlice();
}

void
RoboCompCamMotion::HardwareFailedException::__read(::IceInternal::BasicStream* __is, bool __rid)
{
    if(__rid)
    {
        ::std::string myId;
        __is->read(myId, false);
    }
    __is->startReadSlice();
    __is->read(what);
    __is->endReadSlice();
}

void
RoboCompCamMotion::HardwareFailedException::__write(const ::Ice::OutputStreamPtr&) const
{
    Ice::MarshalException ex(__FILE__, __LINE__);
    ex.reason = "exception RoboCompCamMotion::HardwareFailedException was not generated with stream support";
    throw ex;
}

void
RoboCompCamMotion::HardwareFailedException::__read(const ::Ice::InputStreamPtr&, bool)
{
    Ice::MarshalException ex(__FILE__, __LINE__);
    ex.reason = "exception RoboCompCamMotion::HardwareFailedException was not generated with stream support";
    throw ex;
}

struct __F__RoboCompCamMotion__HardwareFailedException : public ::IceInternal::UserExceptionFactory
{
    virtual void
    createAndThrow()
    {
        throw ::RoboCompCamMotion::HardwareFailedException();
    }
};

static ::IceInternal::UserExceptionFactoryPtr __F__RoboCompCamMotion__HardwareFailedException__Ptr = new __F__RoboCompCamMotion__HardwareFailedException;

const ::IceInternal::UserExceptionFactoryPtr&
RoboCompCamMotion::HardwareFailedException::ice_factory()
{
    return __F__RoboCompCamMotion__HardwareFailedException__Ptr;
}

class __F__RoboCompCamMotion__HardwareFailedException__Init
{
public:

    __F__RoboCompCamMotion__HardwareFailedException__Init()
    {
        ::IceInternal::factoryTable->addExceptionFactory("::RoboCompCamMotion::HardwareFailedException", ::RoboCompCamMotion::HardwareFailedException::ice_factory());
    }

    ~__F__RoboCompCamMotion__HardwareFailedException__Init()
    {
        ::IceInternal::factoryTable->removeExceptionFactory("::RoboCompCamMotion::HardwareFailedException");
    }
};

static __F__RoboCompCamMotion__HardwareFailedException__Init __F__RoboCompCamMotion__HardwareFailedException__i;

#ifdef __APPLE__
extern "C" { void __F__RoboCompCamMotion__HardwareFailedException__initializer() {} }
#endif

RoboCompCamMotion::OutOfRangeException::OutOfRangeException(const ::std::string& __ice_what) :
#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug
    UserException(),
#else
    ::Ice::UserException(),
#endif
    what(__ice_what)
{
}

RoboCompCamMotion::OutOfRangeException::~OutOfRangeException() throw()
{
}

static const char* __RoboCompCamMotion__OutOfRangeException_name = "RoboCompCamMotion::OutOfRangeException";

::std::string
RoboCompCamMotion::OutOfRangeException::ice_name() const
{
    return __RoboCompCamMotion__OutOfRangeException_name;
}

::Ice::Exception*
RoboCompCamMotion::OutOfRangeException::ice_clone() const
{
    return new OutOfRangeException(*this);
}

void
RoboCompCamMotion::OutOfRangeException::ice_throw() const
{
    throw *this;
}

void
RoboCompCamMotion::OutOfRangeException::__write(::IceInternal::BasicStream* __os) const
{
    __os->write(::std::string("::RoboCompCamMotion::OutOfRangeException"), false);
    __os->startWriteSlice();
    __os->write(what);
    __os->endWriteSlice();
}

void
RoboCompCamMotion::OutOfRangeException::__read(::IceInternal::BasicStream* __is, bool __rid)
{
    if(__rid)
    {
        ::std::string myId;
        __is->read(myId, false);
    }
    __is->startReadSlice();
    __is->read(what);
    __is->endReadSlice();
}

void
RoboCompCamMotion::OutOfRangeException::__write(const ::Ice::OutputStreamPtr&) const
{
    Ice::MarshalException ex(__FILE__, __LINE__);
    ex.reason = "exception RoboCompCamMotion::OutOfRangeException was not generated with stream support";
    throw ex;
}

void
RoboCompCamMotion::OutOfRangeException::__read(const ::Ice::InputStreamPtr&, bool)
{
    Ice::MarshalException ex(__FILE__, __LINE__);
    ex.reason = "exception RoboCompCamMotion::OutOfRangeException was not generated with stream support";
    throw ex;
}

struct __F__RoboCompCamMotion__OutOfRangeException : public ::IceInternal::UserExceptionFactory
{
    virtual void
    createAndThrow()
    {
        throw ::RoboCompCamMotion::OutOfRangeException();
    }
};

static ::IceInternal::UserExceptionFactoryPtr __F__RoboCompCamMotion__OutOfRangeException__Ptr = new __F__RoboCompCamMotion__OutOfRangeException;

const ::IceInternal::UserExceptionFactoryPtr&
RoboCompCamMotion::OutOfRangeException::ice_factory()
{
    return __F__RoboCompCamMotion__OutOfRangeException__Ptr;
}

class __F__RoboCompCamMotion__OutOfRangeException__Init
{
public:

    __F__RoboCompCamMotion__OutOfRangeException__Init()
    {
        ::IceInternal::factoryTable->addExceptionFactory("::RoboCompCamMotion::OutOfRangeException", ::RoboCompCamMotion::OutOfRangeException::ice_factory());
    }

    ~__F__RoboCompCamMotion__OutOfRangeException__Init()
    {
        ::IceInternal::factoryTable->removeExceptionFactory("::RoboCompCamMotion::OutOfRangeException");
    }
};

static __F__RoboCompCamMotion__OutOfRangeException__Init __F__RoboCompCamMotion__OutOfRangeException__i;

#ifdef __APPLE__
extern "C" { void __F__RoboCompCamMotion__OutOfRangeException__initializer() {} }
#endif

bool
RoboCompCamMotion::TMotorRanges::operator==(const TMotorRanges& __rhs) const
{
    if(this == &__rhs)
    {
        return true;
    }
    if(min != __rhs.min)
    {
        return false;
    }
    if(max != __rhs.max)
    {
        return false;
    }
    if(number != __rhs.number)
    {
        return false;
    }
    return true;
}

bool
RoboCompCamMotion::TMotorRanges::operator<(const TMotorRanges& __rhs) const
{
    if(this == &__rhs)
    {
        return false;
    }
    if(min < __rhs.min)
    {
        return true;
    }
    else if(__rhs.min < min)
    {
        return false;
    }
    if(max < __rhs.max)
    {
        return true;
    }
    else if(__rhs.max < max)
    {
        return false;
    }
    if(number < __rhs.number)
    {
        return true;
    }
    else if(__rhs.number < number)
    {
        return false;
    }
    return false;
}

void
RoboCompCamMotion::TMotorRanges::__write(::IceInternal::BasicStream* __os) const
{
    __os->write(min);
    __os->write(max);
    __os->write(number);
}

void
RoboCompCamMotion::TMotorRanges::__read(::IceInternal::BasicStream* __is)
{
    __is->read(min);
    __is->read(max);
    __is->read(number);
}

bool
RoboCompCamMotion::TMotorState::operator==(const TMotorState& __rhs) const
{
    if(this == &__rhs)
    {
        return true;
    }
    if(pos != __rhs.pos)
    {
        return false;
    }
    if(vel != __rhs.vel)
    {
        return false;
    }
    if(power != __rhs.power)
    {
        return false;
    }
    if(p != __rhs.p)
    {
        return false;
    }
    if(v != __rhs.v)
    {
        return false;
    }
    if(isMoving != __rhs.isMoving)
    {
        return false;
    }
    return true;
}

bool
RoboCompCamMotion::TMotorState::operator<(const TMotorState& __rhs) const
{
    if(this == &__rhs)
    {
        return false;
    }
    if(pos < __rhs.pos)
    {
        return true;
    }
    else if(__rhs.pos < pos)
    {
        return false;
    }
    if(vel < __rhs.vel)
    {
        return true;
    }
    else if(__rhs.vel < vel)
    {
        return false;
    }
    if(power < __rhs.power)
    {
        return true;
    }
    else if(__rhs.power < power)
    {
        return false;
    }
    if(p < __rhs.p)
    {
        return true;
    }
    else if(__rhs.p < p)
    {
        return false;
    }
    if(v < __rhs.v)
    {
        return true;
    }
    else if(__rhs.v < v)
    {
        return false;
    }
    if(isMoving < __rhs.isMoving)
    {
        return true;
    }
    else if(__rhs.isMoving < isMoving)
    {
        return false;
    }
    return false;
}

void
RoboCompCamMotion::TMotorState::__write(::IceInternal::BasicStream* __os) const
{
    __os->write(pos);
    __os->write(vel);
    __os->write(power);
    __os->write(p);
    __os->write(v);
    __os->write(isMoving);
}

void
RoboCompCamMotion::TMotorState::__read(::IceInternal::BasicStream* __is)
{
    __is->read(pos);
    __is->read(vel);
    __is->read(power);
    __is->read(p);
    __is->read(v);
    __is->read(isMoving);
}

bool
RoboCompCamMotion::THeadRanges::operator==(const THeadRanges& __rhs) const
{
    if(this == &__rhs)
    {
        return true;
    }
    if(left != __rhs.left)
    {
        return false;
    }
    if(right != __rhs.right)
    {
        return false;
    }
    if(tilt != __rhs.tilt)
    {
        return false;
    }
    if(neck != __rhs.neck)
    {
        return false;
    }
    if(leftTilt != __rhs.leftTilt)
    {
        return false;
    }
    if(rightTilt != __rhs.rightTilt)
    {
        return false;
    }
    if(baseline != __rhs.baseline)
    {
        return false;
    }
    return true;
}

bool
RoboCompCamMotion::THeadRanges::operator<(const THeadRanges& __rhs) const
{
    if(this == &__rhs)
    {
        return false;
    }
    if(left < __rhs.left)
    {
        return true;
    }
    else if(__rhs.left < left)
    {
        return false;
    }
    if(right < __rhs.right)
    {
        return true;
    }
    else if(__rhs.right < right)
    {
        return false;
    }
    if(tilt < __rhs.tilt)
    {
        return true;
    }
    else if(__rhs.tilt < tilt)
    {
        return false;
    }
    if(neck < __rhs.neck)
    {
        return true;
    }
    else if(__rhs.neck < neck)
    {
        return false;
    }
    if(leftTilt < __rhs.leftTilt)
    {
        return true;
    }
    else if(__rhs.leftTilt < leftTilt)
    {
        return false;
    }
    if(rightTilt < __rhs.rightTilt)
    {
        return true;
    }
    else if(__rhs.rightTilt < rightTilt)
    {
        return false;
    }
    if(baseline < __rhs.baseline)
    {
        return true;
    }
    else if(__rhs.baseline < baseline)
    {
        return false;
    }
    return false;
}

void
RoboCompCamMotion::THeadRanges::__write(::IceInternal::BasicStream* __os) const
{
    left.__write(__os);
    right.__write(__os);
    tilt.__write(__os);
    neck.__write(__os);
    leftTilt.__write(__os);
    rightTilt.__write(__os);
    __os->write(baseline);
}

void
RoboCompCamMotion::THeadRanges::__read(::IceInternal::BasicStream* __is)
{
    left.__read(__is);
    right.__read(__is);
    tilt.__read(__is);
    neck.__read(__is);
    leftTilt.__read(__is);
    rightTilt.__read(__is);
    __is->read(baseline);
}

bool
RoboCompCamMotion::THeadState::operator==(const THeadState& __rhs) const
{
    if(this == &__rhs)
    {
        return true;
    }
    if(left != __rhs.left)
    {
        return false;
    }
    if(right != __rhs.right)
    {
        return false;
    }
    if(tilt != __rhs.tilt)
    {
        return false;
    }
    if(neck != __rhs.neck)
    {
        return false;
    }
    if(leftTilt != __rhs.leftTilt)
    {
        return false;
    }
    if(rightTilt != __rhs.rightTilt)
    {
        return false;
    }
    if(isMoving != __rhs.isMoving)
    {
        return false;
    }
    return true;
}

bool
RoboCompCamMotion::THeadState::operator<(const THeadState& __rhs) const
{
    if(this == &__rhs)
    {
        return false;
    }
    if(left < __rhs.left)
    {
        return true;
    }
    else if(__rhs.left < left)
    {
        return false;
    }
    if(right < __rhs.right)
    {
        return true;
    }
    else if(__rhs.right < right)
    {
        return false;
    }
    if(tilt < __rhs.tilt)
    {
        return true;
    }
    else if(__rhs.tilt < tilt)
    {
        return false;
    }
    if(neck < __rhs.neck)
    {
        return true;
    }
    else if(__rhs.neck < neck)
    {
        return false;
    }
    if(leftTilt < __rhs.leftTilt)
    {
        return true;
    }
    else if(__rhs.leftTilt < leftTilt)
    {
        return false;
    }
    if(rightTilt < __rhs.rightTilt)
    {
        return true;
    }
    else if(__rhs.rightTilt < rightTilt)
    {
        return false;
    }
    if(isMoving < __rhs.isMoving)
    {
        return true;
    }
    else if(__rhs.isMoving < isMoving)
    {
        return false;
    }
    return false;
}

void
RoboCompCamMotion::THeadState::__write(::IceInternal::BasicStream* __os) const
{
    left.__write(__os);
    right.__write(__os);
    tilt.__write(__os);
    neck.__write(__os);
    leftTilt.__write(__os);
    rightTilt.__write(__os);
    __os->write(isMoving);
}

void
RoboCompCamMotion::THeadState::__read(::IceInternal::BasicStream* __is)
{
    left.__read(__is);
    right.__read(__is);
    tilt.__read(__is);
    neck.__read(__is);
    leftTilt.__read(__is);
    rightTilt.__read(__is);
    __is->read(isMoving);
}

bool
RoboCompCamMotion::TParams::operator==(const TParams& __rhs) const
{
    if(this == &__rhs)
    {
        return true;
    }
    if(TILTMOTOR != __rhs.TILTMOTOR)
    {
        return false;
    }
    if(LEFTTILTMOTOR != __rhs.LEFTTILTMOTOR)
    {
        return false;
    }
    if(RIGHTTILTMOTOR != __rhs.RIGHTTILTMOTOR)
    {
        return false;
    }
    if(LEFTMOTOR != __rhs.LEFTMOTOR)
    {
        return false;
    }
    if(RIGHTMOTOR != __rhs.RIGHTMOTOR)
    {
        return false;
    }
    if(NECKMOTOR != __rhs.NECKMOTOR)
    {
        return false;
    }
    if(LEFTCAMERA != __rhs.LEFTCAMERA)
    {
        return false;
    }
    if(RIGHTCAMERA != __rhs.RIGHTCAMERA)
    {
        return false;
    }
    if(BOTHCAMERAS != __rhs.BOTHCAMERAS)
    {
        return false;
    }
    if(RIGHTZEROPOS != __rhs.RIGHTZEROPOS)
    {
        return false;
    }
    if(LEFTZEROPOS != __rhs.LEFTZEROPOS)
    {
        return false;
    }
    if(TILTZEROPOS != __rhs.TILTZEROPOS)
    {
        return false;
    }
    if(NECKZEROPOS != __rhs.NECKZEROPOS)
    {
        return false;
    }
    if(device != __rhs.device)
    {
        return false;
    }
    if(handler != __rhs.handler)
    {
        return false;
    }
    if(baseline != __rhs.baseline)
    {
        return false;
    }
    if(tiltInvert != __rhs.tiltInvert)
    {
        return false;
    }
    if(leftInvert != __rhs.leftInvert)
    {
        return false;
    }
    if(rightInvert != __rhs.rightInvert)
    {
        return false;
    }
    if(neckInvert != __rhs.neckInvert)
    {
        return false;
    }
    return true;
}

bool
RoboCompCamMotion::TParams::operator<(const TParams& __rhs) const
{
    if(this == &__rhs)
    {
        return false;
    }
    if(TILTMOTOR < __rhs.TILTMOTOR)
    {
        return true;
    }
    else if(__rhs.TILTMOTOR < TILTMOTOR)
    {
        return false;
    }
    if(LEFTTILTMOTOR < __rhs.LEFTTILTMOTOR)
    {
        return true;
    }
    else if(__rhs.LEFTTILTMOTOR < LEFTTILTMOTOR)
    {
        return false;
    }
    if(RIGHTTILTMOTOR < __rhs.RIGHTTILTMOTOR)
    {
        return true;
    }
    else if(__rhs.RIGHTTILTMOTOR < RIGHTTILTMOTOR)
    {
        return false;
    }
    if(LEFTMOTOR < __rhs.LEFTMOTOR)
    {
        return true;
    }
    else if(__rhs.LEFTMOTOR < LEFTMOTOR)
    {
        return false;
    }
    if(RIGHTMOTOR < __rhs.RIGHTMOTOR)
    {
        return true;
    }
    else if(__rhs.RIGHTMOTOR < RIGHTMOTOR)
    {
        return false;
    }
    if(NECKMOTOR < __rhs.NECKMOTOR)
    {
        return true;
    }
    else if(__rhs.NECKMOTOR < NECKMOTOR)
    {
        return false;
    }
    if(LEFTCAMERA < __rhs.LEFTCAMERA)
    {
        return true;
    }
    else if(__rhs.LEFTCAMERA < LEFTCAMERA)
    {
        return false;
    }
    if(RIGHTCAMERA < __rhs.RIGHTCAMERA)
    {
        return true;
    }
    else if(__rhs.RIGHTCAMERA < RIGHTCAMERA)
    {
        return false;
    }
    if(BOTHCAMERAS < __rhs.BOTHCAMERAS)
    {
        return true;
    }
    else if(__rhs.BOTHCAMERAS < BOTHCAMERAS)
    {
        return false;
    }
    if(RIGHTZEROPOS < __rhs.RIGHTZEROPOS)
    {
        return true;
    }
    else if(__rhs.RIGHTZEROPOS < RIGHTZEROPOS)
    {
        return false;
    }
    if(LEFTZEROPOS < __rhs.LEFTZEROPOS)
    {
        return true;
    }
    else if(__rhs.LEFTZEROPOS < LEFTZEROPOS)
    {
        return false;
    }
    if(TILTZEROPOS < __rhs.TILTZEROPOS)
    {
        return true;
    }
    else if(__rhs.TILTZEROPOS < TILTZEROPOS)
    {
        return false;
    }
    if(NECKZEROPOS < __rhs.NECKZEROPOS)
    {
        return true;
    }
    else if(__rhs.NECKZEROPOS < NECKZEROPOS)
    {
        return false;
    }
    if(device < __rhs.device)
    {
        return true;
    }
    else if(__rhs.device < device)
    {
        return false;
    }
    if(handler < __rhs.handler)
    {
        return true;
    }
    else if(__rhs.handler < handler)
    {
        return false;
    }
    if(baseline < __rhs.baseline)
    {
        return true;
    }
    else if(__rhs.baseline < baseline)
    {
        return false;
    }
    if(tiltInvert < __rhs.tiltInvert)
    {
        return true;
    }
    else if(__rhs.tiltInvert < tiltInvert)
    {
        return false;
    }
    if(leftInvert < __rhs.leftInvert)
    {
        return true;
    }
    else if(__rhs.leftInvert < leftInvert)
    {
        return false;
    }
    if(rightInvert < __rhs.rightInvert)
    {
        return true;
    }
    else if(__rhs.rightInvert < rightInvert)
    {
        return false;
    }
    if(neckInvert < __rhs.neckInvert)
    {
        return true;
    }
    else if(__rhs.neckInvert < neckInvert)
    {
        return false;
    }
    return false;
}

void
RoboCompCamMotion::TParams::__write(::IceInternal::BasicStream* __os) const
{
    __os->write(TILTMOTOR);
    __os->write(LEFTTILTMOTOR);
    __os->write(RIGHTTILTMOTOR);
    __os->write(LEFTMOTOR);
    __os->write(RIGHTMOTOR);
    __os->write(NECKMOTOR);
    __os->write(LEFTCAMERA);
    __os->write(RIGHTCAMERA);
    __os->write(BOTHCAMERAS);
    __os->write(RIGHTZEROPOS);
    __os->write(LEFTZEROPOS);
    __os->write(TILTZEROPOS);
    __os->write(NECKZEROPOS);
    __os->write(device);
    __os->write(handler);
    __os->write(baseline);
    __os->write(tiltInvert);
    __os->write(leftInvert);
    __os->write(rightInvert);
    __os->write(neckInvert);
}

void
RoboCompCamMotion::TParams::__read(::IceInternal::BasicStream* __is)
{
    __is->read(TILTMOTOR);
    __is->read(LEFTTILTMOTOR);
    __is->read(RIGHTTILTMOTOR);
    __is->read(LEFTMOTOR);
    __is->read(RIGHTMOTOR);
    __is->read(NECKMOTOR);
    __is->read(LEFTCAMERA);
    __is->read(RIGHTCAMERA);
    __is->read(BOTHCAMERAS);
    __is->read(RIGHTZEROPOS);
    __is->read(LEFTZEROPOS);
    __is->read(TILTZEROPOS);
    __is->read(NECKZEROPOS);
    __is->read(device);
    __is->read(handler);
    __is->read(baseline);
    __is->read(tiltInvert);
    __is->read(leftInvert);
    __is->read(rightInvert);
    __is->read(neckInvert);
}

void
IceProxy::RoboCompCamMotion::CamMotion::resetHead(const ::Ice::Context* __ctx)
{
    int __cnt = 0;
    while(true)
    {
        ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase;
        try
        {
#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug
            IceUtil::DummyBCC dummy;
#endif
            __delBase = __getDelegate(false);
            ::IceDelegate::RoboCompCamMotion::CamMotion* __del = dynamic_cast< ::IceDelegate::RoboCompCamMotion::CamMotion*>(__delBase.get());
            __del->resetHead(__ctx);
            return;
        }
        catch(const ::IceInternal::LocalExceptionWrapper& __ex)
        {
            __handleExceptionWrapper(__delBase, __ex, 0);
        }
        catch(const ::Ice::LocalException& __ex)
        {
            __handleException(__delBase, __ex, 0, __cnt);
        }
    }
}

void
IceProxy::RoboCompCamMotion::CamMotion::stopHead(const ::Ice::Context* __ctx)
{
    int __cnt = 0;
    while(true)
    {
        ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase;
        try
        {
#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug
            IceUtil::DummyBCC dummy;
#endif
            __delBase = __getDelegate(false);
            ::IceDelegate::RoboCompCamMotion::CamMotion* __del = dynamic_cast< ::IceDelegate::RoboCompCamMotion::CamMotion*>(__delBase.get());
            __del->stopHead(__ctx);
            return;
        }
        catch(const ::IceInternal::LocalExceptionWrapper& __ex)
        {
            __handleExceptionWrapper(__delBase, __ex, 0);
        }
        catch(const ::Ice::LocalException& __ex)
        {
            __handleException(__delBase, __ex, 0, __cnt);
        }
    }
}

void
IceProxy::RoboCompCamMotion::CamMotion::setPanLeft(::Ice::Float pan, const ::Ice::Context* __ctx)
{
    int __cnt = 0;
    while(true)
    {
        ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase;
        try
        {
#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug
            IceUtil::DummyBCC dummy;
#endif
            __delBase = __getDelegate(false);
            ::IceDelegate::RoboCompCamMotion::CamMotion* __del = dynamic_cast< ::IceDelegate::RoboCompCamMotion::CamMotion*>(__delBase.get());
            __del->setPanLeft(pan, __ctx);
            return;
        }
        catch(const ::IceInternal::LocalExceptionWrapper& __ex)
        {
            __handleExceptionWrapper(__delBase, __ex, 0);
        }
        catch(const ::Ice::LocalException& __ex)
        {
            __handleException(__delBase, __ex, 0, __cnt);
        }
    }
}

void
IceProxy::RoboCompCamMotion::CamMotion::setPanRight(::Ice::Float pan, const ::Ice::Context* __ctx)
{
    int __cnt = 0;
    while(true)
    {
        ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase;
        try
        {
#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug
            IceUtil::DummyBCC dummy;
#endif
            __delBase = __getDelegate(false);
            ::IceDelegate::RoboCompCamMotion::CamMotion* __del = dynamic_cast< ::IceDelegate::RoboCompCamMotion::CamMotion*>(__delBase.get());
            __del->setPanRight(pan, __ctx);
            return;
        }
        catch(const ::IceInternal::LocalExceptionWrapper& __ex)
        {
            __handleExceptionWrapper(__delBase, __ex, 0);
        }
        catch(const ::Ice::LocalException& __ex)
        {
            __handleException(__delBase, __ex, 0, __cnt);
        }
    }
}

void
IceProxy::RoboCompCamMotion::CamMotion::setTiltLeft(::Ice::Float tilt, const ::Ice::Context* __ctx)
{
    int __cnt = 0;
    while(true)
    {
        ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase;
        try
        {
#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug
            IceUtil::DummyBCC dummy;
#endif
            __delBase = __getDelegate(false);
            ::IceDelegate::RoboCompCamMotion::CamMotion* __del = dynamic_cast< ::IceDelegate::RoboCompCamMotion::CamMotion*>(__delBase.get());
            __del->setTiltLeft(tilt, __ctx);
            return;
        }
        catch(const ::IceInternal::LocalExceptionWrapper& __ex)
        {
            __handleExceptionWrapper(__delBase, __ex, 0);
        }
        catch(const ::Ice::LocalException& __ex)
        {
            __handleException(__delBase, __ex, 0, __cnt);
        }
    }
}

void
IceProxy::RoboCompCamMotion::CamMotion::setTiltRight(::Ice::Float tilt, const ::Ice::Context* __ctx)
{
    int __cnt = 0;
    while(true)
    {
        ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase;
        try
        {
#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug
            IceUtil::DummyBCC dummy;
#endif
            __delBase = __getDelegate(false);
            ::IceDelegate::RoboCompCamMotion::CamMotion* __del = dynamic_cast< ::IceDelegate::RoboCompCamMotion::CamMotion*>(__delBase.get());
            __del->setTiltRight(tilt, __ctx);
            return;
        }
        catch(const ::IceInternal::LocalExceptionWrapper& __ex)
        {
            __handleExceptionWrapper(__delBase, __ex, 0);
        }
        catch(const ::Ice::LocalException& __ex)
        {
            __handleException(__delBase, __ex, 0, __cnt);
        }
    }
}

void
IceProxy::RoboCompCamMotion::CamMotion::setTiltBoth(::Ice::Float tilt, const ::Ice::Context* __ctx)
{
    int __cnt = 0;
    while(true)
    {
        ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase;
        try
        {
#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug
            IceUtil::DummyBCC dummy;
#endif
            __delBase = __getDelegate(false);
            ::IceDelegate::RoboCompCamMotion::CamMotion* __del = dynamic_cast< ::IceDelegate::RoboCompCamMotion::CamMotion*>(__delBase.get());
            __del->setTiltBoth(tilt, __ctx);
            return;
        }
        catch(const ::IceInternal::LocalExceptionWrapper& __ex)
        {
            __handleExceptionWrapper(__delBase, __ex, 0);
        }
        catch(const ::Ice::LocalException& __ex)
        {
            __handleException(__delBase, __ex, 0, __cnt);
        }
    }
}

void
IceProxy::RoboCompCamMotion::CamMotion::setNeck(::Ice::Float neck, const ::Ice::Context* __ctx)
{
    int __cnt = 0;
    while(true)
    {
        ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase;
        try
        {
#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug
            IceUtil::DummyBCC dummy;
#endif
            __delBase = __getDelegate(false);
            ::IceDelegate::RoboCompCamMotion::CamMotion* __del = dynamic_cast< ::IceDelegate::RoboCompCamMotion::CamMotion*>(__delBase.get());
            __del->setNeck(neck, __ctx);
            return;
        }
        catch(const ::IceInternal::LocalExceptionWrapper& __ex)
        {
            __handleExceptionWrapper(__delBase, __ex, 0);
        }
        catch(const ::Ice::LocalException& __ex)
        {
            __handleException(__delBase, __ex, 0, __cnt);
        }
    }
}

void
IceProxy::RoboCompCamMotion::CamMotion::saccadic2D(::Ice::Float panI, ::Ice::Float tilt, const ::Ice::Context* __ctx)
{
    int __cnt = 0;
    while(true)
    {
        ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase;
        try
        {
#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug
            IceUtil::DummyBCC dummy;
#endif
            __delBase = __getDelegate(false);
            ::IceDelegate::RoboCompCamMotion::CamMotion* __del = dynamic_cast< ::IceDelegate::RoboCompCamMotion::CamMotion*>(__delBase.get());
            __del->saccadic2D(panI, tilt, __ctx);
            return;
        }
        catch(const ::IceInternal::LocalExceptionWrapper& __ex)
        {
            __handleExceptionWrapper(__delBase, __ex, 0);
        }
        catch(const ::Ice::LocalException& __ex)
        {
            __handleException(__delBase, __ex, 0, __cnt);
        }
    }
}

void
IceProxy::RoboCompCamMotion::CamMotion::saccadic3D(::Ice::Float panI, ::Ice::Float panD, ::Ice::Float tilt, const ::Ice::Context* __ctx)
{
    int __cnt = 0;
    while(true)
    {
        ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase;
        try
        {
#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug
            IceUtil::DummyBCC dummy;
#endif
            __delBase = __getDelegate(false);
            ::IceDelegate::RoboCompCamMotion::CamMotion* __del = dynamic_cast< ::IceDelegate::RoboCompCamMotion::CamMotion*>(__delBase.get());
            __del->saccadic3D(panI, panD, tilt, __ctx);
            return;
        }
        catch(const ::IceInternal::LocalExceptionWrapper& __ex)
        {
            __handleExceptionWrapper(__delBase, __ex, 0);
        }
        catch(const ::Ice::LocalException& __ex)
        {
            __handleException(__delBase, __ex, 0, __cnt);
        }
    }
}

void
IceProxy::RoboCompCamMotion::CamMotion::getMotorRanges(::Ice::Byte motor, ::RoboCompCamMotion::TMotorRanges& info, const ::Ice::Context* __ctx)
{
    int __cnt = 0;
    while(true)
    {
        ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase;
        try
        {
#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug
            IceUtil::DummyBCC dummy;
#endif
            __checkTwowayOnly(__RoboCompCamMotion__CamMotion__getMotorRanges_name);
            __delBase = __getDelegate(false);
            ::IceDelegate::RoboCompCamMotion::CamMotion* __del = dynamic_cast< ::IceDelegate::RoboCompCamMotion::CamMotion*>(__delBase.get());
            __del->getMotorRanges(motor, info, __ctx);
            return;
        }
        catch(const ::IceInternal::LocalExceptionWrapper& __ex)
        {
            __handleExceptionWrapper(__delBase, __ex, 0);
        }
        catch(const ::Ice::LocalException& __ex)
        {
            __handleException(__delBase, __ex, 0, __cnt);
        }
    }
}

void
IceProxy::RoboCompCamMotion::CamMotion::getMotorState(::Ice::Byte motor, ::RoboCompCamMotion::TMotorState& state, const ::Ice::Context* __ctx)
{
    int __cnt = 0;
    while(true)
    {
        ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase;
        try
        {
#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug
            IceUtil::DummyBCC dummy;
#endif
            __checkTwowayOnly(__RoboCompCamMotion__CamMotion__getMotorState_name);
            __delBase = __getDelegate(false);
            ::IceDelegate::RoboCompCamMotion::CamMotion* __del = dynamic_cast< ::IceDelegate::RoboCompCamMotion::CamMotion*>(__delBase.get());
            __del->getMotorState(motor, state, __ctx);
            return;
        }
        catch(const ::IceInternal::LocalExceptionWrapper& __ex)
        {
            __handleExceptionWrapper(__delBase, __ex, 0);
        }
        catch(const ::Ice::LocalException& __ex)
        {
            __handleException(__delBase, __ex, 0, __cnt);
        }
    }
}

void
IceProxy::RoboCompCamMotion::CamMotion::getHeadState(::RoboCompCamMotion::THeadState& state, const ::Ice::Context* __ctx)
{
    int __cnt = 0;
    while(true)
    {
        ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase;
        try
        {
#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug
            IceUtil::DummyBCC dummy;
#endif
            __checkTwowayOnly(__RoboCompCamMotion__CamMotion__getHeadState_name);
            __delBase = __getDelegate(false);
            ::IceDelegate::RoboCompCamMotion::CamMotion* __del = dynamic_cast< ::IceDelegate::RoboCompCamMotion::CamMotion*>(__delBase.get());
            __del->getHeadState(state, __ctx);
            return;
        }
        catch(const ::IceInternal::LocalExceptionWrapper& __ex)
        {
            __handleExceptionWrapper(__delBase, __ex, 0);
        }
        catch(const ::Ice::LocalException& __ex)
        {
            __handleException(__delBase, __ex, 0, __cnt);
        }
    }
}

void
IceProxy::RoboCompCamMotion::CamMotion::getHeadRanges(::RoboCompCamMotion::THeadRanges& ranges, const ::Ice::Context* __ctx)
{
    int __cnt = 0;
    while(true)
    {
        ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase;
        try
        {
#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug
            IceUtil::DummyBCC dummy;
#endif
            __checkTwowayOnly(__RoboCompCamMotion__CamMotion__getHeadRanges_name);
            __delBase = __getDelegate(false);
            ::IceDelegate::RoboCompCamMotion::CamMotion* __del = dynamic_cast< ::IceDelegate::RoboCompCamMotion::CamMotion*>(__delBase.get());
            __del->getHeadRanges(ranges, __ctx);
            return;
        }
        catch(const ::IceInternal::LocalExceptionWrapper& __ex)
        {
            __handleExceptionWrapper(__delBase, __ex, 0);
        }
        catch(const ::Ice::LocalException& __ex)
        {
            __handleException(__delBase, __ex, 0, __cnt);
        }
    }
}

void
IceProxy::RoboCompCamMotion::CamMotion::setRadSaccadic(::Ice::Float pan, ::Ice::Float tilt, ::Ice::Int cam, const ::Ice::Context* __ctx)
{
    int __cnt = 0;
    while(true)
    {
        ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase;
        try
        {
#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug
            IceUtil::DummyBCC dummy;
#endif
            __delBase = __getDelegate(false);
            ::IceDelegate::RoboCompCamMotion::CamMotion* __del = dynamic_cast< ::IceDelegate::RoboCompCamMotion::CamMotion*>(__delBase.get());
            __del->setRadSaccadic(pan, tilt, cam, __ctx);
            return;
        }
        catch(const ::IceInternal::LocalExceptionWrapper& __ex)
        {
            __handleExceptionWrapper(__delBase, __ex, 0);
        }
        catch(const ::Ice::LocalException& __ex)
        {
            __handleException(__delBase, __ex, 0, __cnt);
        }
    }
}

bool
IceProxy::RoboCompCamMotion::CamMotion::isMovingMotor(::Ice::Byte motor, const ::Ice::Context* __ctx)
{
    int __cnt = 0;
    while(true)
    {
        ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase;
        try
        {
#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug
            IceUtil::DummyBCC dummy;
#endif
            __checkTwowayOnly(__RoboCompCamMotion__CamMotion__isMovingMotor_name);
            __delBase = __getDelegate(false);
            ::IceDelegate::RoboCompCamMotion::CamMotion* __del = dynamic_cast< ::IceDelegate::RoboCompCamMotion::CamMotion*>(__delBase.get());
            return __del->isMovingMotor(motor, __ctx);
        }
        catch(const ::IceInternal::LocalExceptionWrapper& __ex)
        {
            __handleExceptionWrapper(__delBase, __ex, 0);
        }
        catch(const ::Ice::LocalException& __ex)
        {
            __handleException(__delBase, __ex, 0, __cnt);
        }
    }
}

bool
IceProxy::RoboCompCamMotion::CamMotion::isMovingHead(const ::Ice::Context* __ctx)
{
    int __cnt = 0;
    while(true)
    {
        ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase;
        try
        {
#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600) // C++Builder 2009 compiler bug
            IceUtil::DummyBCC dummy;
#endif
            __checkTwowayOnly(__RoboCompCamMotion__CamMotion__isMovingHead_name);
            __delBase = __getDelegate(false);
            ::IceDelegate::RoboCompCamMotion::CamMotion* __del = dynamic_cast< ::IceDelegate::RoboCompCamMotion::CamMotion*>(__delBase.get());
            return __del->isMovingHead(__ctx);
        }
        catch(const ::IceInternal::LocalExceptionWrapper& __ex)
        {
            __handleExceptionWrapper(__delBase, __ex, 0);
        }
        catch(const ::Ice::LocalException& __ex)
        {
            __handleException(__delBase, __ex, 0, __cnt);
        }
    }
}

const ::std::string&
IceProxy::RoboCompCamMotion::CamMotion::ice_staticId()
{
    return ::RoboCompCamMotion::CamMotion::ice_staticId();
}

::IceInternal::Handle< ::IceDelegateM::Ice::Object>
IceProxy::RoboCompCamMotion::CamMotion::__createDelegateM()
{
    return ::IceInternal::Handle< ::IceDelegateM::Ice::Object>(new ::IceDelegateM::RoboCompCamMotion::CamMotion);
}

::IceInternal::Handle< ::IceDelegateD::Ice::Object>
IceProxy::RoboCompCamMotion::CamMotion::__createDelegateD()
{
    return ::IceInternal::Handle< ::IceDelegateD::Ice::Object>(new ::IceDelegateD::RoboCompCamMotion::CamMotion);
}

::IceProxy::Ice::Object*
IceProxy::RoboCompCamMotion::CamMotion::__newInstance() const
{
    return new CamMotion;
}

void
IceDelegateM::RoboCompCamMotion::CamMotion::resetHead(const ::Ice::Context* __context)
{
    ::IceInternal::Outgoing __og(__handler.get(), __RoboCompCamMotion__CamMotion__resetHead_name, ::Ice::Normal, __context);
    bool __ok = __og.invoke();
    if(!__og.is()->b.empty())
    {
        try
        {
            if(!__ok)
            {
                try
                {
                    __og.throwUserException();
                }
                catch(const ::Ice::UserException& __ex)
                {
                    ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name());
                    throw __uue;
                }
            }
            __og.is()->skipEmptyEncaps();
        }
        catch(const ::Ice::LocalException& __ex)
        {
            throw ::IceInternal::LocalExceptionWrapper(__ex, false);
        }
    }
}

void
IceDelegateM::RoboCompCamMotion::CamMotion::stopHead(const ::Ice::Context* __context)
{
    ::IceInternal::Outgoing __og(__handler.get(), __RoboCompCamMotion__CamMotion__stopHead_name, ::Ice::Normal, __context);
    bool __ok = __og.invoke();
    if(!__og.is()->b.empty())
    {
        try
        {
            if(!__ok)
            {
                try
                {
                    __og.throwUserException();
                }
                catch(const ::Ice::UserException& __ex)
                {
                    ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name());
                    throw __uue;
                }
            }
            __og.is()->skipEmptyEncaps();
        }
        catch(const ::Ice::LocalException& __ex)
        {
            throw ::IceInternal::LocalExceptionWrapper(__ex, false);
        }
    }
}

void
IceDelegateM::RoboCompCamMotion::CamMotion::setPanLeft(::Ice::Float pan, const ::Ice::Context* __context)
{
    ::IceInternal::Outgoing __og(__handler.get(), __RoboCompCamMotion__CamMotion__setPanLeft_name, ::Ice::Normal, __context);
    try
    {
        ::IceInternal::BasicStream* __os = __og.os();
        __os->write(pan);
    }
    catch(const ::Ice::LocalException& __ex)
    {
        __og.abort(__ex);
    }
    bool __ok = __og.invoke();
    if(!__og.is()->b.empty())
    {
        try
        {
            if(!__ok)
            {
                try
                {
                    __og.throwUserException();
                }
                catch(const ::Ice::UserException& __ex)
                {
                    ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name());
                    throw __uue;
                }
            }
            __og.is()->skipEmptyEncaps();
        }
        catch(const ::Ice::LocalException& __ex)
        {
            throw ::IceInternal::LocalExceptionWrapper(__ex, false);
        }
    }
}

void
IceDelegateM::RoboCompCamMotion::CamMotion::setPanRight(::Ice::Float pan, const ::Ice::Context* __context)
{
    ::IceInternal::Outgoing __og(__handler.get(), __RoboCompCamMotion__CamMotion__setPanRight_name, ::Ice::Normal, __context);
    try
    {
        ::IceInternal::BasicStream* __os = __og.os();
        __os->write(pan);
    }
    catch(const ::Ice::LocalException& __ex)
    {
        __og.abort(__ex);
    }
    bool __ok = __og.invoke();
    if(!__og.is()->b.empty())
    {
        try
        {
            if(!__ok)
            {
                try
                {
                    __og.throwUserException();
                }
                catch(const ::Ice::UserException& __ex)
                {
                    ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name());
                    throw __uue;
                }
            }
            __og.is()->skipEmptyEncaps();
        }
        catch(const ::Ice::LocalException& __ex)
        {
            throw ::IceInternal::LocalExceptionWrapper(__ex, false);
        }
    }
}

void
IceDelegateM::RoboCompCamMotion::CamMotion::setTiltLeft(::Ice::Float tilt, const ::Ice::Context* __context)
{
    ::IceInternal::Outgoing __og(__handler.get(), __RoboCompCamMotion__CamMotion__setTiltLeft_name, ::Ice::Normal, __context);
    try
    {
        ::IceInternal::BasicStream* __os = __og.os();
        __os->write(tilt);
    }
    catch(const ::Ice::LocalException& __ex)
    {
        __og.abort(__ex);
    }
    bool __ok = __og.invoke();
    if(!__og.is()->b.empty())
    {
        try
        {
            if(!__ok)
            {
                try
                {
                    __og.throwUserException();
                }
                catch(const ::Ice::UserException& __ex)
                {
                    ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name());
                    throw __uue;
                }
            }
            __og.is()->skipEmptyEncaps();
        }
        catch(const ::Ice::LocalException& __ex)
        {
            throw ::IceInternal::LocalExceptionWrapper(__ex, false);
        }
    }
}

void
IceDelegateM::RoboCompCamMotion::CamMotion::setTiltRight(::Ice::Float tilt, const ::Ice::Context* __context)
{
    ::IceInternal::Outgoing __og(__handler.get(), __RoboCompCamMotion__CamMotion__setTiltRight_name, ::Ice::Normal, __context);
    try
    {
        ::IceInternal::BasicStream* __os = __og.os();
        __os->write(tilt);
    }
    catch(const ::Ice::LocalException& __ex)
    {
        __og.abort(__ex);
    }
    bool __ok = __og.invoke();
    if(!__og.is()->b.empty())
    {
        try
        {
            if(!__ok)
            {
                try
                {
                    __og.throwUserException();
                }
                catch(const ::Ice::UserException& __ex)
                {
                    ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name());
                    throw __uue;
                }
            }
            __og.is()->skipEmptyEncaps();
        }
        catch(const ::Ice::LocalException& __ex)
        {
            throw ::IceInternal::LocalExceptionWrapper(__ex, false);
        }
    }
}

void
IceDelegateM::RoboCompCamMotion::CamMotion::setTiltBoth(::Ice::Float tilt, const ::Ice::Context* __context)
{
    ::IceInternal::Outgoing __og(__handler.get(), __RoboCompCamMotion__CamMotion__setTiltBoth_name, ::Ice::Normal, __context);
    try
    {
        ::IceInternal::BasicStream* __os = __og.os();
        __os->write(tilt);
    }
    catch(const ::Ice::LocalException& __ex)
    {
        __og.abort(__ex);
    }
    bool __ok = __og.invoke();
    if(!__og.is()->b.empty())
    {
        try
        {
            if(!__ok)
            {
                try
                {
                    __og.throwUserException();
                }
                catch(const ::Ice::UserException& __ex)
                {
                    ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name());
                    throw __uue;
                }
            }
            __og.is()->skipEmptyEncaps();
        }
        catch(const ::Ice::LocalException& __ex)
        {
            throw ::IceInternal::LocalExceptionWrapper(__ex, false);
        }
    }
}

void
IceDelegateM::RoboCompCamMotion::CamMotion::setNeck(::Ice::Float neck, const ::Ice::Context* __context)
{
    ::IceInternal::Outgoing __og(__handler.get(), __RoboCompCamMotion__CamMotion__setNeck_name, ::Ice::Normal, __context);
    try
    {
        ::IceInternal::BasicStream* __os = __og.os();
        __os->write(neck);
    }
    catch(const ::Ice::LocalException& __ex)
    {
        __og.abort(__ex);
    }
    bool __ok = __og.invoke();
    if(!__og.is()->b.empty())
    {
        try
        {
            if(!__ok)
            {
                try
                {
                    __og.throwUserException();
                }
                catch(const ::Ice::UserException& __ex)
                {
                    ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name());
                    throw __uue;
                }
            }
            __og.is()->skipEmptyEncaps();
        }
        catch(const ::Ice::LocalException& __ex)
        {
            throw ::IceInternal::LocalExceptionWrapper(__ex, false);
        }
    }
}

void
IceDelegateM::RoboCompCamMotion::CamMotion::saccadic2D(::Ice::Float panI, ::Ice::Float tilt, const ::Ice::Context* __context)
{
    ::IceInternal::Outgoing __og(__handler.get(), __RoboCompCamMotion__CamMotion__saccadic2D_name, ::Ice::Normal, __context);
    try
    {
        ::IceInternal::BasicStream* __os = __og.os();
        __os->write(panI);
        __os->write(tilt);
    }
    catch(const ::Ice::LocalException& __ex)
    {
        __og.abort(__ex);
    }
    bool __ok = __og.invoke();
    if(!__og.is()->b.empty())
    {
        try
        {
            if(!__ok)
            {
                try
                {
                    __og.throwUserException();
                }
                catch(const ::Ice::UserException& __ex)
                {
                    ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name());
                    throw __uue;
                }
            }
            __og.is()->skipEmptyEncaps();
        }
        catch(const ::Ice::LocalException& __ex)
        {
            throw ::IceInternal::LocalExceptionWrapper(__ex, false);
        }
    }
}

void
IceDelegateM::RoboCompCamMotion::CamMotion::saccadic3D(::Ice::Float panI, ::Ice::Float panD, ::Ice::Float tilt, const ::Ice::Context* __context)
{
    ::IceInternal::Outgoing __og(__handler.get(), __RoboCompCamMotion__CamMotion__saccadic3D_name, ::Ice::Normal, __context);
    try
    {
        ::IceInternal::BasicStream* __os = __og.os();
        __os->write(panI);
        __os->write(panD);
        __os->write(tilt);
    }
    catch(const ::Ice::LocalException& __ex)
    {
        __og.abort(__ex);
    }
    bool __ok = __og.invoke();
    if(!__og.is()->b.empty())
    {
        try
        {
            if(!__ok)
            {
                try
                {
                    __og.throwUserException();
                }
                catch(const ::Ice::UserException& __ex)
                {
                    ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name());
                    throw __uue;
                }
            }
            __og.is()->skipEmptyEncaps();
        }
        catch(const ::Ice::LocalException& __ex)
        {
            throw ::IceInternal::LocalExceptionWrapper(__ex, false);
        }
    }
}

void
IceDelegateM::RoboCompCamMotion::CamMotion::getMotorRanges(::Ice::Byte motor, ::RoboCompCamMotion::TMotorRanges& info, const ::Ice::Context* __context)
{
    ::IceInternal::Outgoing __og(__handler.get(), __RoboCompCamMotion__CamMotion__getMotorRanges_name, ::Ice::Normal, __context);
    try
    {
        ::IceInternal::BasicStream* __os = __og.os();
        __os->write(motor);
    }
    catch(const ::Ice::LocalException& __ex)
    {
        __og.abort(__ex);
    }
    bool __ok = __og.invoke();
    try
    {
        if(!__ok)
        {
            try
            {
                __og.throwUserException();
            }
            catch(const ::Ice::UserException& __ex)
            {
                ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name());
                throw __uue;
            }
        }
        ::IceInternal::BasicStream* __is = __og.is();
        __is->startReadEncaps();
        info.__read(__is);
        __is->endReadEncaps();
    }
    catch(const ::Ice::LocalException& __ex)
    {
        throw ::IceInternal::LocalExceptionWrapper(__ex, false);
    }
}

void
IceDelegateM::RoboCompCamMotion::CamMotion::getMotorState(::Ice::Byte motor, ::RoboCompCamMotion::TMotorState& state, const ::Ice::Context* __context)
{
    ::IceInternal::Outgoing __og(__handler.get(), __RoboCompCamMotion__CamMotion__getMotorState_name, ::Ice::Normal, __context);
    try
    {
        ::IceInternal::BasicStream* __os = __og.os();
        __os->write(motor);
    }
    catch(const ::Ice::LocalException& __ex)
    {
        __og.abort(__ex);
    }
    bool __ok = __og.invoke();
    try
    {
        if(!__ok)
        {
            try
            {
                __og.throwUserException();
            }
            catch(const ::Ice::UserException& __ex)
            {
                ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name());
                throw __uue;
            }
        }
        ::IceInternal::BasicStream* __is = __og.is();
        __is->startReadEncaps();
        state.__read(__is);
        __is->endReadEncaps();
    }
    catch(const ::Ice::LocalException& __ex)
    {
        throw ::IceInternal::LocalExceptionWrapper(__ex, false);
    }
}

void
IceDelegateM::RoboCompCamMotion::CamMotion::getHeadState(::RoboCompCamMotion::THeadState& state, const ::Ice::Context* __context)
{
    ::IceInternal::Outgoing __og(__handler.get(), __RoboCompCamMotion__CamMotion__getHeadState_name, ::Ice::Normal, __context);
    bool __ok = __og.invoke();
    try
    {
        if(!__ok)
        {
            try
            {
                __og.throwUserException();
            }
            catch(const ::Ice::UserException& __ex)
            {
                ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name());
                throw __uue;
            }
        }
        ::IceInternal::BasicStream* __is = __og.is();
        __is->startReadEncaps();
        state.__read(__is);
        __is->endReadEncaps();
    }
    catch(const ::Ice::LocalException& __ex)
    {
        throw ::IceInternal::LocalExceptionWrapper(__ex, false);
    }
}

void
IceDelegateM::RoboCompCamMotion::CamMotion::getHeadRanges(::RoboCompCamMotion::THeadRanges& ranges, const ::Ice::Context* __context)
{
    ::IceInternal::Outgoing __og(__handler.get(), __RoboCompCamMotion__CamMotion__getHeadRanges_name, ::Ice::Normal, __context);
    bool __ok = __og.invoke();
    try
    {
        if(!__ok)
        {
            try
            {
                __og.throwUserException();
            }
            catch(const ::Ice::UserException& __ex)
            {
                ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name());
                throw __uue;
            }
        }
        ::IceInternal::BasicStream* __is = __og.is();
        __is->startReadEncaps();
        ranges.__read(__is);
        __is->endReadEncaps();
    }
    catch(const ::Ice::LocalException& __ex)
    {
        throw ::IceInternal::LocalExceptionWrapper(__ex, false);
    }
}

void
IceDelegateM::RoboCompCamMotion::CamMotion::setRadSaccadic(::Ice::Float pan, ::Ice::Float tilt, ::Ice::Int cam, const ::Ice::Context* __context)
{
    ::IceInternal::Outgoing __og(__handler.get(), __RoboCompCamMotion__CamMotion__setRadSaccadic_name, ::Ice::Normal, __context);
    try
    {
        ::IceInternal::BasicStream* __os = __og.os();
        __os->write(pan);
        __os->write(tilt);
        __os->write(cam);
    }
    catch(const ::Ice::LocalException& __ex)
    {
        __og.abort(__ex);
    }
    bool __ok = __og.invoke();
    if(!__og.is()->b.empty())
    {
        try
        {
            if(!__ok)
            {
                try
                {
                    __og.throwUserException();
                }
                catch(const ::Ice::UserException& __ex)
                {
                    ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name());
                    throw __uue;
                }
            }
            __og.is()->skipEmptyEncaps();
        }
        catch(const ::Ice::LocalException& __ex)
        {
            throw ::IceInternal::LocalExceptionWrapper(__ex, false);
        }
    }
}

bool
IceDelegateM::RoboCompCamMotion::CamMotion::isMovingMotor(::Ice::Byte motor, const ::Ice::Context* __context)
{
    ::IceInternal::Outgoing __og(__handler.get(), __RoboCompCamMotion__CamMotion__isMovingMotor_name, ::Ice::Normal, __context);
    try
    {
        ::IceInternal::BasicStream* __os = __og.os();
        __os->write(motor);
    }
    catch(const ::Ice::LocalException& __ex)
    {
        __og.abort(__ex);
    }
    bool __ok = __og.invoke();
    bool __ret;
    try
    {
        if(!__ok)
        {
            try
            {
                __og.throwUserException();
            }
            catch(const ::Ice::UserException& __ex)
            {
                ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name());
                throw __uue;
            }
        }
        ::IceInternal::BasicStream* __is = __og.is();
        __is->startReadEncaps();
        __is->read(__ret);
        __is->endReadEncaps();
        return __ret;
    }
    catch(const ::Ice::LocalException& __ex)
    {
        throw ::IceInternal::LocalExceptionWrapper(__ex, false);
    }
}

bool
IceDelegateM::RoboCompCamMotion::CamMotion::isMovingHead(const ::Ice::Context* __context)
{
    ::IceInternal::Outgoing __og(__handler.get(), __RoboCompCamMotion__CamMotion__isMovingHead_name, ::Ice::Normal, __context);
    bool __ok = __og.invoke();
    bool __ret;
    try
    {
        if(!__ok)
        {
            try
            {
                __og.throwUserException();
            }
            catch(const ::Ice::UserException& __ex)
            {
                ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name());
                throw __uue;
            }
        }
        ::IceInternal::BasicStream* __is = __og.is();
        __is->startReadEncaps();
        __is->read(__ret);
        __is->endReadEncaps();
        return __ret;
    }
    catch(const ::Ice::LocalException& __ex)
    {
        throw ::IceInternal::LocalExceptionWrapper(__ex, false);
    }
}

void
IceDelegateD::RoboCompCamMotion::CamMotion::resetHead(const ::Ice::Context* __context)
{
    class _DirectI : public ::IceInternal::Direct
    {
    public:

        _DirectI(const ::Ice::Current& __current) : 
            ::IceInternal::Direct(__current)
        {
        }
        
        virtual ::Ice::DispatchStatus
        run(::Ice::Object* object)
        {
            ::RoboCompCamMotion::CamMotion* servant = dynamic_cast< ::RoboCompCamMotion::CamMotion*>(object);
            if(!servant)
            {
                throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation);
            }
            servant->resetHead(_current);
            return ::Ice::DispatchOK;
        }
        
    private:
        
    };
    
    ::Ice::Current __current;
    __initCurrent(__current, __RoboCompCamMotion__CamMotion__resetHead_name, ::Ice::Normal, __context);
    try
    {
        _DirectI __direct(__current);
        try
        {
            __direct.servant()->__collocDispatch(__direct);
        }
        catch(...)
        {
            __direct.destroy();
            throw;
        }
        __direct.destroy();
    }
    catch(const ::Ice::SystemException&)
    {
        throw;
    }
    catch(const ::IceInternal::LocalExceptionWrapper&)
    {
        throw;
    }
    catch(const ::std::exception& __ex)
    {
        ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex);
    }
    catch(...)
    {
        throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false);
    }
}

void
IceDelegateD::RoboCompCamMotion::CamMotion::stopHead(const ::Ice::Context* __context)
{
    class _DirectI : public ::IceInternal::Direct
    {
    public:

        _DirectI(const ::Ice::Current& __current) : 
            ::IceInternal::Direct(__current)
        {
        }
        
        virtual ::Ice::DispatchStatus
        run(::Ice::Object* object)
        {
            ::RoboCompCamMotion::CamMotion* servant = dynamic_cast< ::RoboCompCamMotion::CamMotion*>(object);
            if(!servant)
            {
                throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation);
            }
            servant->stopHead(_current);
            return ::Ice::DispatchOK;
        }
        
    private:
        
    };
    
    ::Ice::Current __current;
    __initCurrent(__current, __RoboCompCamMotion__CamMotion__stopHead_name, ::Ice::Normal, __context);
    try
    {
        _DirectI __direct(__current);
        try
        {
            __direct.servant()->__collocDispatch(__direct);
        }
        catch(...)
        {
            __direct.destroy();
            throw;
        }
        __direct.destroy();
    }
    catch(const ::Ice::SystemException&)
    {
        throw;
    }
    catch(const ::IceInternal::LocalExceptionWrapper&)
    {
        throw;
    }
    catch(const ::std::exception& __ex)
    {
        ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex);
    }
    catch(...)
    {
        throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false);
    }
}

void
IceDelegateD::RoboCompCamMotion::CamMotion::setPanLeft(::Ice::Float pan, const ::Ice::Context* __context)
{
    class _DirectI : public ::IceInternal::Direct
    {
    public:

        _DirectI(::Ice::Float pan, const ::Ice::Current& __current) : 
            ::IceInternal::Direct(__current),
            _m_pan(pan)
        {
        }
        
        virtual ::Ice::DispatchStatus
        run(::Ice::Object* object)
        {
            ::RoboCompCamMotion::CamMotion* servant = dynamic_cast< ::RoboCompCamMotion::CamMotion*>(object);
            if(!servant)
            {
                throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation);
            }
            servant->setPanLeft(_m_pan, _current);
            return ::Ice::DispatchOK;
        }
        
    private:
        
        ::Ice::Float _m_pan;
    };
    
    ::Ice::Current __current;
    __initCurrent(__current, __RoboCompCamMotion__CamMotion__setPanLeft_name, ::Ice::Normal, __context);
    try
    {
        _DirectI __direct(pan, __current);
        try
        {
            __direct.servant()->__collocDispatch(__direct);
        }
        catch(...)
        {
            __direct.destroy();
            throw;
        }
        __direct.destroy();
    }
    catch(const ::Ice::SystemException&)
    {
        throw;
    }
    catch(const ::IceInternal::LocalExceptionWrapper&)
    {
        throw;
    }
    catch(const ::std::exception& __ex)
    {
        ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex);
    }
    catch(...)
    {
        throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false);
    }
}

void
IceDelegateD::RoboCompCamMotion::CamMotion::setPanRight(::Ice::Float pan, const ::Ice::Context* __context)
{
    class _DirectI : public ::IceInternal::Direct
    {
    public:

        _DirectI(::Ice::Float pan, const ::Ice::Current& __current) : 
            ::IceInternal::Direct(__current),
            _m_pan(pan)
        {
        }
        
        virtual ::Ice::DispatchStatus
        run(::Ice::Object* object)
        {
            ::RoboCompCamMotion::CamMotion* servant = dynamic_cast< ::RoboCompCamMotion::CamMotion*>(object);
            if(!servant)
            {
                throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation);
            }
            servant->setPanRight(_m_pan, _current);
            return ::Ice::DispatchOK;
        }
        
    private:
        
        ::Ice::Float _m_pan;
    };
    
    ::Ice::Current __current;
    __initCurrent(__current, __RoboCompCamMotion__CamMotion__setPanRight_name, ::Ice::Normal, __context);
    try
    {
        _DirectI __direct(pan, __current);
        try
        {
            __direct.servant()->__collocDispatch(__direct);
        }
        catch(...)
        {
            __direct.destroy();
            throw;
        }
        __direct.destroy();
    }
    catch(const ::Ice::SystemException&)
    {
        throw;
    }
    catch(const ::IceInternal::LocalExceptionWrapper&)
    {
        throw;
    }
    catch(const ::std::exception& __ex)
    {
        ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex);
    }
    catch(...)
    {
        throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false);
    }
}

void
IceDelegateD::RoboCompCamMotion::CamMotion::setTiltLeft(::Ice::Float tilt, const ::Ice::Context* __context)
{
    class _DirectI : public ::IceInternal::Direct
    {
    public:

        _DirectI(::Ice::Float tilt, const ::Ice::Current& __current) : 
            ::IceInternal::Direct(__current),
            _m_tilt(tilt)
        {
        }
        
        virtual ::Ice::DispatchStatus
        run(::Ice::Object* object)
        {
            ::RoboCompCamMotion::CamMotion* servant = dynamic_cast< ::RoboCompCamMotion::CamMotion*>(object);
            if(!servant)
            {
                throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation);
            }
            servant->setTiltLeft(_m_tilt, _current);
            return ::Ice::DispatchOK;
        }
        
    private:
        
        ::Ice::Float _m_tilt;
    };
    
    ::Ice::Current __current;
    __initCurrent(__current, __RoboCompCamMotion__CamMotion__setTiltLeft_name, ::Ice::Normal, __context);
    try
    {
        _DirectI __direct(tilt, __current);
        try
        {
            __direct.servant()->__collocDispatch(__direct);
        }
        catch(...)
        {
            __direct.destroy();
            throw;
        }
        __direct.destroy();
    }
    catch(const ::Ice::SystemException&)
    {
        throw;
    }
    catch(const ::IceInternal::LocalExceptionWrapper&)
    {
        throw;
    }
    catch(const ::std::exception& __ex)
    {
        ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex);
    }
    catch(...)
    {
        throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false);
    }
}

void
IceDelegateD::RoboCompCamMotion::CamMotion::setTiltRight(::Ice::Float tilt, const ::Ice::Context* __context)
{
    class _DirectI : public ::IceInternal::Direct
    {
    public:

        _DirectI(::Ice::Float tilt, const ::Ice::Current& __current) : 
            ::IceInternal::Direct(__current),
            _m_tilt(tilt)
        {
        }
        
        virtual ::Ice::DispatchStatus
        run(::Ice::Object* object)
        {
            ::RoboCompCamMotion::CamMotion* servant = dynamic_cast< ::RoboCompCamMotion::CamMotion*>(object);
            if(!servant)
            {
                throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation);
            }
            servant->setTiltRight(_m_tilt, _current);
            return ::Ice::DispatchOK;
        }
        
    private:
        
        ::Ice::Float _m_tilt;
    };
    
    ::Ice::Current __current;
    __initCurrent(__current, __RoboCompCamMotion__CamMotion__setTiltRight_name, ::Ice::Normal, __context);
    try
    {
        _DirectI __direct(tilt, __current);
        try
        {
            __direct.servant()->__collocDispatch(__direct);
        }
        catch(...)
        {
            __direct.destroy();
            throw;
        }
        __direct.destroy();
    }
    catch(const ::Ice::SystemException&)
    {
        throw;
    }
    catch(const ::IceInternal::LocalExceptionWrapper&)
    {
        throw;
    }
    catch(const ::std::exception& __ex)
    {
        ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex);
    }
    catch(...)
    {
        throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false);
    }
}

void
IceDelegateD::RoboCompCamMotion::CamMotion::setTiltBoth(::Ice::Float tilt, const ::Ice::Context* __context)
{
    class _DirectI : public ::IceInternal::Direct
    {
    public:

        _DirectI(::Ice::Float tilt, const ::Ice::Current& __current) : 
            ::IceInternal::Direct(__current),
            _m_tilt(tilt)
        {
        }
        
        virtual ::Ice::DispatchStatus
        run(::Ice::Object* object)
        {
            ::RoboCompCamMotion::CamMotion* servant = dynamic_cast< ::RoboCompCamMotion::CamMotion*>(object);
            if(!servant)
            {
                throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation);
            }
            servant->setTiltBoth(_m_tilt, _current);
            return ::Ice::DispatchOK;
        }
        
    private:
        
        ::Ice::Float _m_tilt;
    };
    
    ::Ice::Current __current;
    __initCurrent(__current, __RoboCompCamMotion__CamMotion__setTiltBoth_name, ::Ice::Normal, __context);
    try
    {
        _DirectI __direct(tilt, __current);
        try
        {
            __direct.servant()->__collocDispatch(__direct);
        }
        catch(...)
        {
            __direct.destroy();
            throw;
        }
        __direct.destroy();
    }
    catch(const ::Ice::SystemException&)
    {
        throw;
    }
    catch(const ::IceInternal::LocalExceptionWrapper&)
    {
        throw;
    }
    catch(const ::std::exception& __ex)
    {
        ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex);
    }
    catch(...)
    {
        throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false);
    }
}

void
IceDelegateD::RoboCompCamMotion::CamMotion::setNeck(::Ice::Float neck, const ::Ice::Context* __context)
{
    class _DirectI : public ::IceInternal::Direct
    {
    public:

        _DirectI(::Ice::Float neck, const ::Ice::Current& __current) : 
            ::IceInternal::Direct(__current),
            _m_neck(neck)
        {
        }
        
        virtual ::Ice::DispatchStatus
        run(::Ice::Object* object)
        {
            ::RoboCompCamMotion::CamMotion* servant = dynamic_cast< ::RoboCompCamMotion::CamMotion*>(object);
            if(!servant)
            {
                throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation);
            }
            servant->setNeck(_m_neck, _current);
            return ::Ice::DispatchOK;
        }
        
    private:
        
        ::Ice::Float _m_neck;
    };
    
    ::Ice::Current __current;
    __initCurrent(__current, __RoboCompCamMotion__CamMotion__setNeck_name, ::Ice::Normal, __context);
    try
    {
        _DirectI __direct(neck, __current);
        try
        {
            __direct.servant()->__collocDispatch(__direct);
        }
        catch(...)
        {
            __direct.destroy();
            throw;
        }
        __direct.destroy();
    }
    catch(const ::Ice::SystemException&)
    {
        throw;
    }
    catch(const ::IceInternal::LocalExceptionWrapper&)
    {
        throw;
    }
    catch(const ::std::exception& __ex)
    {
        ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex);
    }
    catch(...)
    {
        throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false);
    }
}

void
IceDelegateD::RoboCompCamMotion::CamMotion::saccadic2D(::Ice::Float panI, ::Ice::Float tilt, const ::Ice::Context* __context)
{
    class _DirectI : public ::IceInternal::Direct
    {
    public:

        _DirectI(::Ice::Float panI, ::Ice::Float tilt, const ::Ice::Current& __current) : 
            ::IceInternal::Direct(__current),
            _m_panI(panI),
            _m_tilt(tilt)
        {
        }
        
        virtual ::Ice::DispatchStatus
        run(::Ice::Object* object)
        {
            ::RoboCompCamMotion::CamMotion* servant = dynamic_cast< ::RoboCompCamMotion::CamMotion*>(object);
            if(!servant)
            {
                throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation);
            }
            servant->saccadic2D(_m_panI, _m_tilt, _current);
            return ::Ice::DispatchOK;
        }
        
    private:
        
        ::Ice::Float _m_panI;
        ::Ice::Float _m_tilt;
    };
    
    ::Ice::Current __current;
    __initCurrent(__current, __RoboCompCamMotion__CamMotion__saccadic2D_name, ::Ice::Normal, __context);
    try
    {
        _DirectI __direct(panI, tilt, __current);
        try
        {
            __direct.servant()->__collocDispatch(__direct);
        }
        catch(...)
        {
            __direct.destroy();
            throw;
        }
        __direct.destroy();
    }
    catch(const ::Ice::SystemException&)
    {
        throw;
    }
    catch(const ::IceInternal::LocalExceptionWrapper&)
    {
        throw;
    }
    catch(const ::std::exception& __ex)
    {
        ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex);
    }
    catch(...)
    {
        throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false);
    }
}

void
IceDelegateD::RoboCompCamMotion::CamMotion::saccadic3D(::Ice::Float panI, ::Ice::Float panD, ::Ice::Float tilt, const ::Ice::Context* __context)
{
    class _DirectI : public ::IceInternal::Direct
    {
    public:

        _DirectI(::Ice::Float panI, ::Ice::Float panD, ::Ice::Float tilt, const ::Ice::Current& __current) : 
            ::IceInternal::Direct(__current),
            _m_panI(panI),
            _m_panD(panD),
            _m_tilt(tilt)
        {
        }
        
        virtual ::Ice::DispatchStatus
        run(::Ice::Object* object)
        {
            ::RoboCompCamMotion::CamMotion* servant = dynamic_cast< ::RoboCompCamMotion::CamMotion*>(object);
            if(!servant)
            {
                throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation);
            }
            servant->saccadic3D(_m_panI, _m_panD, _m_tilt, _current);
            return ::Ice::DispatchOK;
        }
        
    private:
        
        ::Ice::Float _m_panI;
        ::Ice::Float _m_panD;
        ::Ice::Float _m_tilt;
    };
    
    ::Ice::Current __current;
    __initCurrent(__current, __RoboCompCamMotion__CamMotion__saccadic3D_name, ::Ice::Normal, __context);
    try
    {
        _DirectI __direct(panI, panD, tilt, __current);
        try
        {
            __direct.servant()->__collocDispatch(__direct);
        }
        catch(...)
        {
            __direct.destroy();
            throw;
        }
        __direct.destroy();
    }
    catch(const ::Ice::SystemException&)
    {
        throw;
    }
    catch(const ::IceInternal::LocalExceptionWrapper&)
    {
        throw;
    }
    catch(const ::std::exception& __ex)
    {
        ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex);
    }
    catch(...)
    {
        throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false);
    }
}

void
IceDelegateD::RoboCompCamMotion::CamMotion::getMotorRanges(::Ice::Byte motor, ::RoboCompCamMotion::TMotorRanges& info, const ::Ice::Context* __context)
{
    class _DirectI : public ::IceInternal::Direct
    {
    public:

        _DirectI(::Ice::Byte motor, ::RoboCompCamMotion::TMotorRanges& info, const ::Ice::Current& __current) : 
            ::IceInternal::Direct(__current),
            _m_motor(motor),
            _m_info(info)
        {
        }
        
        virtual ::Ice::DispatchStatus
        run(::Ice::Object* object)
        {
            ::RoboCompCamMotion::CamMotion* servant = dynamic_cast< ::RoboCompCamMotion::CamMotion*>(object);
            if(!servant)
            {
                throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation);
            }
            servant->getMotorRanges(_m_motor, _m_info, _current);
            return ::Ice::DispatchOK;
        }
        
    private:
        
        ::Ice::Byte _m_motor;
        ::RoboCompCamMotion::TMotorRanges& _m_info;
    };
    
    ::Ice::Current __current;
    __initCurrent(__current, __RoboCompCamMotion__CamMotion__getMotorRanges_name, ::Ice::Normal, __context);
    try
    {
        _DirectI __direct(motor, info, __current);
        try
        {
            __direct.servant()->__collocDispatch(__direct);
        }
        catch(...)
        {
            __direct.destroy();
            throw;
        }
        __direct.destroy();
    }
    catch(const ::Ice::SystemException&)
    {
        throw;
    }
    catch(const ::IceInternal::LocalExceptionWrapper&)
    {
        throw;
    }
    catch(const ::std::exception& __ex)
    {
        ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex);
    }
    catch(...)
    {
        throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false);
    }
}

void
IceDelegateD::RoboCompCamMotion::CamMotion::getMotorState(::Ice::Byte motor, ::RoboCompCamMotion::TMotorState& state, const ::Ice::Context* __context)
{
    class _DirectI : public ::IceInternal::Direct
    {
    public:

        _DirectI(::Ice::Byte motor, ::RoboCompCamMotion::TMotorState& state, const ::Ice::Current& __current) : 
            ::IceInternal::Direct(__current),
            _m_motor(motor),
            _m_state(state)
        {
        }
        
        virtual ::Ice::DispatchStatus
        run(::Ice::Object* object)
        {
            ::RoboCompCamMotion::CamMotion* servant = dynamic_cast< ::RoboCompCamMotion::CamMotion*>(object);
            if(!servant)
            {
                throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation);
            }
            servant->getMotorState(_m_motor, _m_state, _current);
            return ::Ice::DispatchOK;
        }
        
    private:
        
        ::Ice::Byte _m_motor;
        ::RoboCompCamMotion::TMotorState& _m_state;
    };
    
    ::Ice::Current __current;
    __initCurrent(__current, __RoboCompCamMotion__CamMotion__getMotorState_name, ::Ice::Normal, __context);
    try
    {
        _DirectI __direct(motor, state, __current);
        try
        {
            __direct.servant()->__collocDispatch(__direct);
        }
        catch(...)
        {
            __direct.destroy();
            throw;
        }
        __direct.destroy();
    }
    catch(const ::Ice::SystemException&)
    {
        throw;
    }
    catch(const ::IceInternal::LocalExceptionWrapper&)
    {
        throw;
    }
    catch(const ::std::exception& __ex)
    {
        ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex);
    }
    catch(...)
    {
        throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false);
    }
}

void
IceDelegateD::RoboCompCamMotion::CamMotion::getHeadState(::RoboCompCamMotion::THeadState& state, const ::Ice::Context* __context)
{
    class _DirectI : public ::IceInternal::Direct
    {
    public:

        _DirectI(::RoboCompCamMotion::THeadState& state, const ::Ice::Current& __current) : 
            ::IceInternal::Direct(__current),
            _m_state(state)
        {
        }
        
        virtual ::Ice::DispatchStatus
        run(::Ice::Object* object)
        {
            ::RoboCompCamMotion::CamMotion* servant = dynamic_cast< ::RoboCompCamMotion::CamMotion*>(object);
            if(!servant)
            {
                throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation);
            }
            servant->getHeadState(_m_state, _current);
            return ::Ice::DispatchOK;
        }
        
    private:
        
        ::RoboCompCamMotion::THeadState& _m_state;
    };
    
    ::Ice::Current __current;
    __initCurrent(__current, __RoboCompCamMotion__CamMotion__getHeadState_name, ::Ice::Normal, __context);
    try
    {
        _DirectI __direct(state, __current);
        try
        {
            __direct.servant()->__collocDispatch(__direct);
        }
        catch(...)
        {
            __direct.destroy();
            throw;
        }
        __direct.destroy();
    }
    catch(const ::Ice::SystemException&)
    {
        throw;
    }
    catch(const ::IceInternal::LocalExceptionWrapper&)
    {
        throw;
    }
    catch(const ::std::exception& __ex)
    {
        ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex);
    }
    catch(...)
    {
        throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false);
    }
}

void
IceDelegateD::RoboCompCamMotion::CamMotion::getHeadRanges(::RoboCompCamMotion::THeadRanges& ranges, const ::Ice::Context* __context)
{
    class _DirectI : public ::IceInternal::Direct
    {
    public:

        _DirectI(::RoboCompCamMotion::THeadRanges& ranges, const ::Ice::Current& __current) : 
            ::IceInternal::Direct(__current),
            _m_ranges(ranges)
        {
        }
        
        virtual ::Ice::DispatchStatus
        run(::Ice::Object* object)
        {
            ::RoboCompCamMotion::CamMotion* servant = dynamic_cast< ::RoboCompCamMotion::CamMotion*>(object);
            if(!servant)
            {
                throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation);
            }
            servant->getHeadRanges(_m_ranges, _current);
            return ::Ice::DispatchOK;
        }
        
    private:
        
        ::RoboCompCamMotion::THeadRanges& _m_ranges;
    };
    
    ::Ice::Current __current;
    __initCurrent(__current, __RoboCompCamMotion__CamMotion__getHeadRanges_name, ::Ice::Normal, __context);
    try
    {
        _DirectI __direct(ranges, __current);
        try
        {
            __direct.servant()->__collocDispatch(__direct);
        }
        catch(...)
        {
            __direct.destroy();
            throw;
        }
        __direct.destroy();
    }
    catch(const ::Ice::SystemException&)
    {
        throw;
    }
    catch(const ::IceInternal::LocalExceptionWrapper&)
    {
        throw;
    }
    catch(const ::std::exception& __ex)
    {
        ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex);
    }
    catch(...)
    {
        throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false);
    }
}

void
IceDelegateD::RoboCompCamMotion::CamMotion::setRadSaccadic(::Ice::Float pan, ::Ice::Float tilt, ::Ice::Int cam, const ::Ice::Context* __context)
{
    class _DirectI : public ::IceInternal::Direct
    {
    public:

        _DirectI(::Ice::Float pan, ::Ice::Float tilt, ::Ice::Int cam, const ::Ice::Current& __current) : 
            ::IceInternal::Direct(__current),
            _m_pan(pan),
            _m_tilt(tilt),
            _m_cam(cam)
        {
        }
        
        virtual ::Ice::DispatchStatus
        run(::Ice::Object* object)
        {
            ::RoboCompCamMotion::CamMotion* servant = dynamic_cast< ::RoboCompCamMotion::CamMotion*>(object);
            if(!servant)
            {
                throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation);
            }
            servant->setRadSaccadic(_m_pan, _m_tilt, _m_cam, _current);
            return ::Ice::DispatchOK;
        }
        
    private:
        
        ::Ice::Float _m_pan;
        ::Ice::Float _m_tilt;
        ::Ice::Int _m_cam;
    };
    
    ::Ice::Current __current;
    __initCurrent(__current, __RoboCompCamMotion__CamMotion__setRadSaccadic_name, ::Ice::Normal, __context);
    try
    {
        _DirectI __direct(pan, tilt, cam, __current);
        try
        {
            __direct.servant()->__collocDispatch(__direct);
        }
        catch(...)
        {
            __direct.destroy();
            throw;
        }
        __direct.destroy();
    }
    catch(const ::Ice::SystemException&)
    {
        throw;
    }
    catch(const ::IceInternal::LocalExceptionWrapper&)
    {
        throw;
    }
    catch(const ::std::exception& __ex)
    {
        ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex);
    }
    catch(...)
    {
        throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false);
    }
}

bool
IceDelegateD::RoboCompCamMotion::CamMotion::isMovingMotor(::Ice::Byte motor, const ::Ice::Context* __context)
{
    class _DirectI : public ::IceInternal::Direct
    {
    public:

        _DirectI(bool& __result, ::Ice::Byte motor, const ::Ice::Current& __current) : 
            ::IceInternal::Direct(__current),
            _result(__result),
            _m_motor(motor)
        {
        }
        
        virtual ::Ice::DispatchStatus
        run(::Ice::Object* object)
        {
            ::RoboCompCamMotion::CamMotion* servant = dynamic_cast< ::RoboCompCamMotion::CamMotion*>(object);
            if(!servant)
            {
                throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation);
            }
            _result = servant->isMovingMotor(_m_motor, _current);
            return ::Ice::DispatchOK;
        }
        
    private:
        
        bool& _result;
        ::Ice::Byte _m_motor;
    };
    
    ::Ice::Current __current;
    __initCurrent(__current, __RoboCompCamMotion__CamMotion__isMovingMotor_name, ::Ice::Normal, __context);
    bool __result;
    try
    {
        _DirectI __direct(__result, motor, __current);
        try
        {
            __direct.servant()->__collocDispatch(__direct);
        }
        catch(...)
        {
            __direct.destroy();
            throw;
        }
        __direct.destroy();
    }
    catch(const ::Ice::SystemException&)
    {
        throw;
    }
    catch(const ::IceInternal::LocalExceptionWrapper&)
    {
        throw;
    }
    catch(const ::std::exception& __ex)
    {
        ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex);
    }
    catch(...)
    {
        throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false);
    }
    return __result;
}

bool
IceDelegateD::RoboCompCamMotion::CamMotion::isMovingHead(const ::Ice::Context* __context)
{
    class _DirectI : public ::IceInternal::Direct
    {
    public:

        _DirectI(bool& __result, const ::Ice::Current& __current) : 
            ::IceInternal::Direct(__current),
            _result(__result)
        {
        }
        
        virtual ::Ice::DispatchStatus
        run(::Ice::Object* object)
        {
            ::RoboCompCamMotion::CamMotion* servant = dynamic_cast< ::RoboCompCamMotion::CamMotion*>(object);
            if(!servant)
            {
                throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation);
            }
            _result = servant->isMovingHead(_current);
            return ::Ice::DispatchOK;
        }
        
    private:
        
        bool& _result;
    };
    
    ::Ice::Current __current;
    __initCurrent(__current, __RoboCompCamMotion__CamMotion__isMovingHead_name, ::Ice::Normal, __context);
    bool __result;
    try
    {
        _DirectI __direct(__result, __current);
        try
        {
            __direct.servant()->__collocDispatch(__direct);
        }
        catch(...)
        {
            __direct.destroy();
            throw;
        }
        __direct.destroy();
    }
    catch(const ::Ice::SystemException&)
    {
        throw;
    }
    catch(const ::IceInternal::LocalExceptionWrapper&)
    {
        throw;
    }
    catch(const ::std::exception& __ex)
    {
        ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex);
    }
    catch(...)
    {
        throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false);
    }
    return __result;
}

::Ice::ObjectPtr
RoboCompCamMotion::CamMotion::ice_clone() const
{
    throw ::Ice::CloneNotImplementedException(__FILE__, __LINE__);
    return 0; // to avoid a warning with some compilers
}

static const ::std::string __RoboCompCamMotion__CamMotion_ids[2] =
{
    "::Ice::Object",
    "::RoboCompCamMotion::CamMotion"
};

bool
RoboCompCamMotion::CamMotion::ice_isA(const ::std::string& _s, const ::Ice::Current&) const
{
    return ::std::binary_search(__RoboCompCamMotion__CamMotion_ids, __RoboCompCamMotion__CamMotion_ids + 2, _s);
}

::std::vector< ::std::string>
RoboCompCamMotion::CamMotion::ice_ids(const ::Ice::Current&) const
{
    return ::std::vector< ::std::string>(&__RoboCompCamMotion__CamMotion_ids[0], &__RoboCompCamMotion__CamMotion_ids[2]);
}

const ::std::string&
RoboCompCamMotion::CamMotion::ice_id(const ::Ice::Current&) const
{
    return __RoboCompCamMotion__CamMotion_ids[1];
}

const ::std::string&
RoboCompCamMotion::CamMotion::ice_staticId()
{
    return __RoboCompCamMotion__CamMotion_ids[1];
}

::Ice::DispatchStatus
RoboCompCamMotion::CamMotion::___resetHead(::IceInternal::Incoming& __inS, const ::Ice::Current& __current)
{
    __checkMode(::Ice::Normal, __current.mode);
    __inS.is()->skipEmptyEncaps();
    resetHead(__current);
    return ::Ice::DispatchOK;
}

::Ice::DispatchStatus
RoboCompCamMotion::CamMotion::___stopHead(::IceInternal::Incoming& __inS, const ::Ice::Current& __current)
{
    __checkMode(::Ice::Normal, __current.mode);
    __inS.is()->skipEmptyEncaps();
    stopHead(__current);
    return ::Ice::DispatchOK;
}

::Ice::DispatchStatus
RoboCompCamMotion::CamMotion::___setPanLeft(::IceInternal::Incoming& __inS, const ::Ice::Current& __current)
{
    __checkMode(::Ice::Normal, __current.mode);
    ::IceInternal::BasicStream* __is = __inS.is();
    __is->startReadEncaps();
    ::Ice::Float pan;
    __is->read(pan);
    __is->endReadEncaps();
    setPanLeft(pan, __current);
    return ::Ice::DispatchOK;
}

::Ice::DispatchStatus
RoboCompCamMotion::CamMotion::___setPanRight(::IceInternal::Incoming& __inS, const ::Ice::Current& __current)
{
    __checkMode(::Ice::Normal, __current.mode);
    ::IceInternal::BasicStream* __is = __inS.is();
    __is->startReadEncaps();
    ::Ice::Float pan;
    __is->read(pan);
    __is->endReadEncaps();
    setPanRight(pan, __current);
    return ::Ice::DispatchOK;
}

::Ice::DispatchStatus
RoboCompCamMotion::CamMotion::___setTiltLeft(::IceInternal::Incoming& __inS, const ::Ice::Current& __current)
{
    __checkMode(::Ice::Normal, __current.mode);
    ::IceInternal::BasicStream* __is = __inS.is();
    __is->startReadEncaps();
    ::Ice::Float tilt;
    __is->read(tilt);
    __is->endReadEncaps();
    setTiltLeft(tilt, __current);
    return ::Ice::DispatchOK;
}

::Ice::DispatchStatus
RoboCompCamMotion::CamMotion::___setTiltRight(::IceInternal::Incoming& __inS, const ::Ice::Current& __current)
{
    __checkMode(::Ice::Normal, __current.mode);
    ::IceInternal::BasicStream* __is = __inS.is();
    __is->startReadEncaps();
    ::Ice::Float tilt;
    __is->read(tilt);
    __is->endReadEncaps();
    setTiltRight(tilt, __current);
    return ::Ice::DispatchOK;
}

::Ice::DispatchStatus
RoboCompCamMotion::CamMotion::___setTiltBoth(::IceInternal::Incoming& __inS, const ::Ice::Current& __current)
{
    __checkMode(::Ice::Normal, __current.mode);
    ::IceInternal::BasicStream* __is = __inS.is();
    __is->startReadEncaps();
    ::Ice::Float tilt;
    __is->read(tilt);
    __is->endReadEncaps();
    setTiltBoth(tilt, __current);
    return ::Ice::DispatchOK;
}

::Ice::DispatchStatus
RoboCompCamMotion::CamMotion::___setNeck(::IceInternal::Incoming& __inS, const ::Ice::Current& __current)
{
    __checkMode(::Ice::Normal, __current.mode);
    ::IceInternal::BasicStream* __is = __inS.is();
    __is->startReadEncaps();
    ::Ice::Float neck;
    __is->read(neck);
    __is->endReadEncaps();
    setNeck(neck, __current);
    return ::Ice::DispatchOK;
}

::Ice::DispatchStatus
RoboCompCamMotion::CamMotion::___saccadic2D(::IceInternal::Incoming& __inS, const ::Ice::Current& __current)
{
    __checkMode(::Ice::Normal, __current.mode);
    ::IceInternal::BasicStream* __is = __inS.is();
    __is->startReadEncaps();
    ::Ice::Float panI;
    ::Ice::Float tilt;
    __is->read(panI);
    __is->read(tilt);
    __is->endReadEncaps();
    saccadic2D(panI, tilt, __current);
    return ::Ice::DispatchOK;
}

::Ice::DispatchStatus
RoboCompCamMotion::CamMotion::___saccadic3D(::IceInternal::Incoming& __inS, const ::Ice::Current& __current)
{
    __checkMode(::Ice::Normal, __current.mode);
    ::IceInternal::BasicStream* __is = __inS.is();
    __is->startReadEncaps();
    ::Ice::Float panI;
    ::Ice::Float panD;
    ::Ice::Float tilt;
    __is->read(panI);
    __is->read(panD);
    __is->read(tilt);
    __is->endReadEncaps();
    saccadic3D(panI, panD, tilt, __current);
    return ::Ice::DispatchOK;
}

::Ice::DispatchStatus
RoboCompCamMotion::CamMotion::___getMotorRanges(::IceInternal::Incoming& __inS, const ::Ice::Current& __current)
{
    __checkMode(::Ice::Normal, __current.mode);
    ::IceInternal::BasicStream* __is = __inS.is();
    __is->startReadEncaps();
    ::Ice::Byte motor;
    __is->read(motor);
    __is->endReadEncaps();
    ::IceInternal::BasicStream* __os = __inS.os();
    ::RoboCompCamMotion::TMotorRanges info;
    getMotorRanges(motor, info, __current);
    info.__write(__os);
    return ::Ice::DispatchOK;
}

::Ice::DispatchStatus
RoboCompCamMotion::CamMotion::___getMotorState(::IceInternal::Incoming& __inS, const ::Ice::Current& __current)
{
    __checkMode(::Ice::Normal, __current.mode);
    ::IceInternal::BasicStream* __is = __inS.is();
    __is->startReadEncaps();
    ::Ice::Byte motor;
    __is->read(motor);
    __is->endReadEncaps();
    ::IceInternal::BasicStream* __os = __inS.os();
    ::RoboCompCamMotion::TMotorState state;
    getMotorState(motor, state, __current);
    state.__write(__os);
    return ::Ice::DispatchOK;
}

::Ice::DispatchStatus
RoboCompCamMotion::CamMotion::___getHeadState(::IceInternal::Incoming& __inS, const ::Ice::Current& __current)
{
    __checkMode(::Ice::Normal, __current.mode);
    __inS.is()->skipEmptyEncaps();
    ::IceInternal::BasicStream* __os = __inS.os();
    ::RoboCompCamMotion::THeadState state;
    getHeadState(state, __current);
    state.__write(__os);
    return ::Ice::DispatchOK;
}

::Ice::DispatchStatus
RoboCompCamMotion::CamMotion::___getHeadRanges(::IceInternal::Incoming& __inS, const ::Ice::Current& __current)
{
    __checkMode(::Ice::Normal, __current.mode);
    __inS.is()->skipEmptyEncaps();
    ::IceInternal::BasicStream* __os = __inS.os();
    ::RoboCompCamMotion::THeadRanges ranges;
    getHeadRanges(ranges, __current);
    ranges.__write(__os);
    return ::Ice::DispatchOK;
}

::Ice::DispatchStatus
RoboCompCamMotion::CamMotion::___setRadSaccadic(::IceInternal::Incoming& __inS, const ::Ice::Current& __current)
{
    __checkMode(::Ice::Normal, __current.mode);
    ::IceInternal::BasicStream* __is = __inS.is();
    __is->startReadEncaps();
    ::Ice::Float pan;
    ::Ice::Float tilt;
    ::Ice::Int cam;
    __is->read(pan);
    __is->read(tilt);
    __is->read(cam);
    __is->endReadEncaps();
    setRadSaccadic(pan, tilt, cam, __current);
    return ::Ice::DispatchOK;
}

::Ice::DispatchStatus
RoboCompCamMotion::CamMotion::___isMovingMotor(::IceInternal::Incoming& __inS, const ::Ice::Current& __current)
{
    __checkMode(::Ice::Normal, __current.mode);
    ::IceInternal::BasicStream* __is = __inS.is();
    __is->startReadEncaps();
    ::Ice::Byte motor;
    __is->read(motor);
    __is->endReadEncaps();
    ::IceInternal::BasicStream* __os = __inS.os();
    bool __ret = isMovingMotor(motor, __current);
    __os->write(__ret);
    return ::Ice::DispatchOK;
}

::Ice::DispatchStatus
RoboCompCamMotion::CamMotion::___isMovingHead(::IceInternal::Incoming& __inS, const ::Ice::Current& __current)
{
    __checkMode(::Ice::Normal, __current.mode);
    __inS.is()->skipEmptyEncaps();
    ::IceInternal::BasicStream* __os = __inS.os();
    bool __ret = isMovingHead(__current);
    __os->write(__ret);
    return ::Ice::DispatchOK;
}

static ::std::string __RoboCompCamMotion__CamMotion_all[] =
{
    "getHeadRanges",
    "getHeadState",
    "getMotorRanges",
    "getMotorState",
    "ice_id",
    "ice_ids",
    "ice_isA",
    "ice_ping",
    "isMovingHead",
    "isMovingMotor",
    "resetHead",
    "saccadic2D",
    "saccadic3D",
    "setNeck",
    "setPanLeft",
    "setPanRight",
    "setRadSaccadic",
    "setTiltBoth",
    "setTiltLeft",
    "setTiltRight",
    "stopHead"
};

::Ice::DispatchStatus
RoboCompCamMotion::CamMotion::__dispatch(::IceInternal::Incoming& in, const ::Ice::Current& current)
{
    ::std::pair< ::std::string*, ::std::string*> r = ::std::equal_range(__RoboCompCamMotion__CamMotion_all, __RoboCompCamMotion__CamMotion_all + 21, current.operation);
    if(r.first == r.second)
    {
        throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation);
    }

    switch(r.first - __RoboCompCamMotion__CamMotion_all)
    {
        case 0:
        {
            return ___getHeadRanges(in, current);
        }
        case 1:
        {
            return ___getHeadState(in, current);
        }
        case 2:
        {
            return ___getMotorRanges(in, current);
        }
        case 3:
        {
            return ___getMotorState(in, current);
        }
        case 4:
        {
            return ___ice_id(in, current);
        }
        case 5:
        {
            return ___ice_ids(in, current);
        }
        case 6:
        {
            return ___ice_isA(in, current);
        }
        case 7:
        {
            return ___ice_ping(in, current);
        }
        case 8:
        {
            return ___isMovingHead(in, current);
        }
        case 9:
        {
            return ___isMovingMotor(in, current);
        }
        case 10:
        {
            return ___resetHead(in, current);
        }
        case 11:
        {
            return ___saccadic2D(in, current);
        }
        case 12:
        {
            return ___saccadic3D(in, current);
        }
        case 13:
        {
            return ___setNeck(in, current);
        }
        case 14:
        {
            return ___setPanLeft(in, current);
        }
        case 15:
        {
            return ___setPanRight(in, current);
        }
        case 16:
        {
            return ___setRadSaccadic(in, current);
        }
        case 17:
        {
            return ___setTiltBoth(in, current);
        }
        case 18:
        {
            return ___setTiltLeft(in, current);
        }
        case 19:
        {
            return ___setTiltRight(in, current);
        }
        case 20:
        {
            return ___stopHead(in, current);
        }
    }

    assert(false);
    throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation);
}

void
RoboCompCamMotion::CamMotion::__write(::IceInternal::BasicStream* __os) const
{
    __os->writeTypeId(ice_staticId());
    __os->startWriteSlice();
    __os->endWriteSlice();
#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug
    Object::__write(__os);
#else
    ::Ice::Object::__write(__os);
#endif
}

void
RoboCompCamMotion::CamMotion::__read(::IceInternal::BasicStream* __is, bool __rid)
{
    if(__rid)
    {
        ::std::string myId;
        __is->readTypeId(myId);
    }
    __is->startReadSlice();
    __is->endReadSlice();
#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug
    Object::__read(__is, true);
#else
    ::Ice::Object::__read(__is, true);
#endif
}

void
RoboCompCamMotion::CamMotion::__write(const ::Ice::OutputStreamPtr&) const
{
    Ice::MarshalException ex(__FILE__, __LINE__);
    ex.reason = "type RoboCompCamMotion::CamMotion was not generated with stream support";
    throw ex;
}

void
RoboCompCamMotion::CamMotion::__read(const ::Ice::InputStreamPtr&, bool)
{
    Ice::MarshalException ex(__FILE__, __LINE__);
    ex.reason = "type RoboCompCamMotion::CamMotion was not generated with stream support";
    throw ex;
}

void 
RoboCompCamMotion::__patch__CamMotionPtr(void* __addr, ::Ice::ObjectPtr& v)
{
    ::RoboCompCamMotion::CamMotionPtr* p = static_cast< ::RoboCompCamMotion::CamMotionPtr*>(__addr);
    assert(p);
    *p = ::RoboCompCamMotion::CamMotionPtr::dynamicCast(v);
    if(v && !*p)
    {
        IceInternal::Ex::throwUOE(::RoboCompCamMotion::CamMotion::ice_staticId(), v->ice_id());
    }
}

bool
RoboCompCamMotion::operator==(const ::RoboCompCamMotion::CamMotion& l, const ::RoboCompCamMotion::CamMotion& r)
{
    return static_cast<const ::Ice::Object&>(l) == static_cast<const ::Ice::Object&>(r);
}

bool
RoboCompCamMotion::operator<(const ::RoboCompCamMotion::CamMotion& l, const ::RoboCompCamMotion::CamMotion& r)
{
    return static_cast<const ::Ice::Object&>(l) < static_cast<const ::Ice::Object&>(r);
}
